.vs-loading {
  min-height: 100px;
  background-image: url(./oval.svg);
  // background-size: 30px 30px;
  background-position: center center;
  background-repeat: no-repeat;
}

.vs-tree-node {
  height: 26px;
  cursor: pointer;
  color: #606266;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
  padding: 0 0 2px;
  box-sizing: border-box;

  &:hover {
    background-color: #eee;
  }

  &:first-child {
    .expand {
      &::before {
        height: 0;
      }
    }
  }
}

.vs-indent-unit {
  position: relative;
  display: inline-block;
  width: 14px;
  height: 14px;
  vertical-align: middle;

  &::after {
    content: "";
    width: 0;
    height: 160%;
    position: absolute;
    left: 50%;
    border-left: 1px dashed #ddd;
    top: -8px;
  }
}

.vs-loading-unit.is-loading {
  width: 14px;
  height: 14px;
  margin-right: 5px;
  display: inline-block;
  vertical-align: middle;

  &::after {
    content: "";
    width: 14px;
    height: 14px;
    display: inline-block;
    vertical-align: top;
  }
}

.expand,
.expand-empty {
  width: 14px;
  height: 14px;
  line-height: 10px;
  display: inline-block;
  margin-right: 5px;
  color: #bbb;
  text-align: center;
  box-sizing: border-box;
  vertical-align: middle;
}

.expand {
  position: relative;
  cursor: pointer;

  &.vs-expand-icon {
    &::after {
      content: "";
      width: 14px;
      height: 14px;
      display: inline-block;
      background-image: url(./expand.svg);
      background-size: 10px 10px;
      background-repeat: no-repeat;
      background-position: center center;
      transform: rotate(-90deg);
      transition: transform .3s;
    }
  }
}

.expanded {
  color: #bbb;

  &.vs-expand-icon::after {
    transform: rotate(0);
  }
}

.expand.is-loading, .vs-loading-unit.is-loading {
  &::after {
    background-image: url(./oval.svg);
    background-repeat: no-repeat;
    background-size: 14px 14px;
    border: none;
    color: transparent;
  }
}

.vs-indent-unit ~ .expand {
  &::before {
    content: "";
    position: absolute;
    top: -50%;
    left: 50%;
    width: 0;
    height: 50%;
    margin-top: -25%;
    border-left: 1px dashed #ddd;
  }
}

.vs-tree-node:not([vs-child]) + .vs-tree-node{
  .vs-indent-unit ~ .expand {
    &::before {
      display: none;
    }
  }
}

.vs-indent-unit ~ .expand-empty {
  position: relative;

  &::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    margin-top: -1px;
    border-bottom: 1px dashed #ddd;
  }

  &::before {
    content: "";
    position: absolute;
    top: -50%;
    left: 50%;
    height: 200%;
    border-left: 1px dashed #ddd;
  }
}

.selected {
  background-color: #eee;
}

.vs-checkbox, .vs-radio {
  position: relative;
  color: #606266;
  font-weight: 500;
  cursor: pointer;
  display: inline-block;
  white-space: nowrap;
  user-select: none;
  margin-right: 8px;
  vertical-align: middle;
  font-size: 0;
}

.vs-checkbox__input, .vs-radio__input {
  white-space: nowrap;
  cursor: pointer;
  outline: none;
  display: inline-block;
  line-height: 1;
  position: relative;
  vertical-align: middle;
}

.vs-checkbox__inner, .vs-radio__inner {
  display: inline-block;
  position: relative;
  border: 1px solid #d9d9d9;
  border-radius: 2px;
  box-sizing: border-box;
  width: 14px;
  height: 14px;
  background-color: #FFFFFF;
  z-index: 1;
  transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46), background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
}

.is-indeterminate .vs-checkbox__inner::before {
  content: '';
  position: absolute;
  display: block;
  background-color: #1989fa;
  height: 12px;
  transform: scale(0.6);
  left: 0;
  right: 0;
  top: 0;
  border-radius: 2px;
}

.vs-checkbox__original:checked ~ .vs-checkbox__inner {
  background-color: #1989fa;
  border-color: #1989fa;
}

.vs-checkbox__original:checked ~ .vs-checkbox__inner::after {
  transform: rotate(45deg) scaleY(1);
}

.vs-checkbox__inner::after {
  box-sizing: content-box;
  content: "";
  border: 1px solid #FFFFFF;
  border-left: 0;
  border-top: 0;
  height: 7px;
  left: 4px;
  position: absolute;
  top: 1px;
  transform: rotate(45deg) scaleY(0);
  width: 3px;
  transition: all .2s cubic-bezier(.12,.4,.29,1.46) .1s;
  transform-origin: center;
}

.vs-checkbox__original:disabled ~ .vs-checkbox__inner {
  background-color: #edf2fc;
  border-color: #dcdfe6;
  cursor: not-allowed;
}

.vs-checkbox__original:checked:disabled ~ .vs-checkbox__inner:after {
  border-color: #c0c4cc;
}

.vs-checkbox__original, .vs-radio__original {
  opacity: 0;
  outline: none;
  position: absolute;
  margin: 0;
  width: 0;
  height: 0;
  z-index: -1;
}

.vs-radio__inner {
  border-radius: 100%;
}

.vs-radio__inner:after {
  box-sizing: content-box;
  content: "";
  left: 3px;
  position: absolute;
  top: 3px;
  width: 6px;
  height: 6px;
  transform: scale(0);
  transition: transform .15s ease-in .05s;
  transform-origin: center;
  border-radius: 100%;
}

.vs-radio__original:checked ~ .vs-radio__inner {
  border-color: #1989fa;
}

.vs-radio__original:checked ~ .vs-radio__inner:after {
  background-color: #1989fa;
  transform: scale(1);
}

.vs-radio__original:checked:disabled ~ .vs-radio__inner:after {
  border-color: #c0c4cc;
}

.vs-icon-leaf, .vs-icon-parent {
  width: 14px;
  height: 14px;
  margin-right: 5px;
  display: inline-block;
  vertical-align: middle;
  background-image: url(./leaf.svg);
  background-size: 12px 12px;
  background-repeat: no-repeat;
  background-position: center;

  > img {
    width: 100%;
    height: 100%;
  } 
}

.vs-icon-parent {
  background-image: url(./parent.svg);
}

.vs-transition {
  height: 0;
  transition: all .3s ease;
  overflow-y: hidden;
}

.vs-tree-node {
  &.vs-drag-enter {
    background-color: rgba(#1989fa, .8);
    color: #fff;
  }
  &.vs-drag-over-gap-top, 
  &.vs-drag-over-gap-bottom {
    position: relative;
    &::before {
      content: '';
      position: absolute;
      left: 0;
      width: 100%;
      height: 2px;
      background-color: #1989fa;
    }
  }
  
  &.vs-drag-over-gap-top {
    &::before {
      top: 0;
    }
  }
  
  &.vs-drag-over-gap-bottom {
    &::before {
      bottom: 0;
    }
  }
}


.vs-search-only-leaf {
  .vs-tree-inner {
    padding-left: 0!important;
    .expand-empty {
      display: none;
    }
  }
}

.vs-theme-element {
  .is-indeterminate .vs-checkbox__inner {
    background-color: #1989fa;
    border-color: #1989fa;
  }
  .is-indeterminate .vs-checkbox__inner::before {
    background-color: #fff;
    height: 1px;
    width: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
  }
}

// 面包屑
.vs-breadcrumb {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-variant: tabular-nums;
  line-height: 1.5715;
  list-style: none;
  font-feature-settings: "tnum";
  color: rgba(0,0,0,.45);
  font-size: 14px;
  font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;

  & > span {
    display: inline-block;
    
    &:not(:last-child) {
      cursor: pointer;
      color: #1989fa;
      &:hover {
        color: rgba(#1989fa, .8);
      }
    }

    &:last-child {
      color: rgba(0,0,0,.85);
    }
  }

  &-separator {
    margin: 0 8px;
    color: rgba(0,0,0,.45);
  }
}